<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="UTF-8"/>
		<title></title>
		<link rel="stylesheet" href="../static/css/base.css"/>
		<style type="text/css">
			#tbody{
				padding-top: 150px;
			}
		</style>
	</head>
	<body>
		<div id="menu" class="bg_color">
		</div>
		<div id="tbody">
			<form id="login_form">
				<div class="form-group">
		   			<label for="account" class="col-sm-3 control-label">帐号</label>
		    		<div class="col-sm-4">
		       			<input type="text" name="account" class="form-control" id="account" placeholder="账号" value="">
		    		</div>
		    		<div class="clear"></div>
				</div>
				<div class="form-group">
		   			<label for="pwd" class="col-sm-3 control-label">密码</label>
		    		<div class="col-sm-4">
		      			<input type="password" name="pwd" class="form-control" id="pswd" placeholder="密码" value="">
		    		</div>
		   			 <div class="clear"></div>
				</div>
				<div class="form-group">
					<button id="btn" type="button" class="form-control">登录</button>
				</div>
			</form>
		</div>

		<script src="../static/js/jquery-3.0.0.min.js"></script>
		<script src="../static/js/base.js"></script>
		<script src="../static/js/p.js"></script>
		<script>
			$(function(){
				demo.btn_click();
			});
			var demo={
				btn_click:function(){
					$('#btn').click(function(){
						var login_url="http://www.uneven.live:8080/login"; 
						var usename=$('#account').val(),
							pass=$('#pswd').val();
						var details =$('#register').serialize();
						$.ajax({
							type:"POST",
							url:login_url,
							timeout:200,
							data:details,
							beforeSend:function(){

							},
							complete:function(){

							},
							success:function(data){
								if(data.code==0){
									location.href=homeURL;
								}
							},
							fail:function(){
								alert("服务器连接失败");
							}
						})
						

					});
				},
			};
		</script>
	</body>
</html>